<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/limh/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/limh/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/limh/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/limh/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/limh/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/limh/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/limh/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="教程,">










<meta name="description" content="我们讲独立按键扫描的时候，大家已经简单认识了矩阵按键是什么样子了。矩阵按键相当于 4 组每组各 4 个独立按键，一共是 16 个按键。那我们如何区分这些按键呢？想一下我们生活所在的地球，要想确定我们所在的位置，就要借助经纬线，而矩阵按键就是通过行线和列线来确定哪个按键被按下的。那么在程序中我们又如何进行这项操作呢？ 前边讲过，按键按下通常都会保持 100ms 以上，如果在按键扫描中断中，我们每次让">
<meta name="keywords" content="教程">
<meta property="og:type" content="article">
<meta property="og:title" content="8.7、单片机矩阵按键的扫描">
<meta property="og:url" content="https://tdnr.gitee.io/limh/2014/12/01/mcu054/index.html">
<meta property="og:site_name" content="土逗牛肉">
<meta property="og:description" content="我们讲独立按键扫描的时候，大家已经简单认识了矩阵按键是什么样子了。矩阵按键相当于 4 组每组各 4 个独立按键，一共是 16 个按键。那我们如何区分这些按键呢？想一下我们生活所在的地球，要想确定我们所在的位置，就要借助经纬线，而矩阵按键就是通过行线和列线来确定哪个按键被按下的。那么在程序中我们又如何进行这项操作呢？ 前边讲过，按键按下通常都会保持 100ms 以上，如果在按键扫描中断中，我们每次让">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2019-01-27T03:38:47.243Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="8.7、单片机矩阵按键的扫描">
<meta name="twitter:description" content="我们讲独立按键扫描的时候，大家已经简单认识了矩阵按键是什么样子了。矩阵按键相当于 4 组每组各 4 个独立按键，一共是 16 个按键。那我们如何区分这些按键呢？想一下我们生活所在的地球，要想确定我们所在的位置，就要借助经纬线，而矩阵按键就是通过行线和列线来确定哪个按键被按下的。那么在程序中我们又如何进行这项操作呢？ 前边讲过，按键按下通常都会保持 100ms 以上，如果在按键扫描中断中，我们每次让">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/limh/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://tdnr.gitee.io/limh/2014/12/01/mcu054/">





  <title>8.7、单片机矩阵按键的扫描 | 土逗牛肉</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans ">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/limh/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">土逗牛肉</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/limh/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/limh/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/limh/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/limh/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/limh/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://tdnr.gitee.io/limh/limh/2014/12/01/mcu054/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="土逗牛肉">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/limh/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="土逗牛肉">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">8.7、单片机矩阵按键的扫描</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2014-12-01T20:36:37+08:00">
                2014-12-01
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/limh/categories/单片机教程/" itemprop="url" rel="index">
                    <span itemprop="name">单片机教程</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>我们讲独立按键扫描的时候，大家已经简单认识了矩阵按键是什么样子了。矩阵按键相当于 4 组每组各 4 个独立按键，一共是 16 个按键。那我们如何区分这些按键呢？想一下我们生活所在的地球，要想确定我们所在的位置，就要借助经纬线，而矩阵按键就是通过行线和列线来确定哪个按键被按下的。那么在程序中我们又如何进行这项操作呢？</p>
<p>前边讲过，按键按下通常都会保持 100ms 以上，如果在按键扫描中断中，我们每次让矩阵按键的一个 KeyOut 输出低电平，其它三个输出高电平，判断当前所有 KeyIn 的状态，下次中断时再让下一个 KeyOut 输出低电平，其它三个输出高电平，再次判断所有 KeyIn，通过快速的中断不停的循环进行判断，就可以最终确定哪个按键按下了，这个原理是不是跟数码管动态扫描有点类似？数码管我们在动态赋值，而按键这里我们在动态读取状态。至于扫描间隔时间和消抖时间，因为现在有 4 个 KeyOut 输出，要中断 4 次才能完成一次全部按键的扫描，显然再采用 2ms 中断判断 8 次扫描值的方式时间就太长了（2<em>4</em>8=64ms），那么我们就改用 1ms 中断判断 4 次采样值，这样消抖时间还是 16ms(1<em>4</em>4)。下面就用程序实现出来，程序循环扫描板子上的 K1～K16 这 16 个矩阵按键，分离出按键动作并在按键按下时把当前按键的编号显示在一位数码管上（用 0~F 表示，显示值=按键编号-1）。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br></pre></td><td class="code"><pre><span class="line">#include &lt;reg52.h&gt;</span><br><span class="line">sbit ADDR0 = P1^0;</span><br><span class="line">sbit ADDR1 = P1^1;</span><br><span class="line">sbit ADDR2 = P1^2;</span><br><span class="line">sbit ADDR3 = P1^3;</span><br><span class="line">sbit ENLED = P1^4;</span><br><span class="line">sbit KEY_IN_1 = P2^4;</span><br><span class="line">sbit KEY_IN_2 = P2^5;</span><br><span class="line">sbit KEY_IN_3 = P2^6;</span><br><span class="line">sbit KEY_IN_4 = P2^7;</span><br><span class="line">sbit KEY_OUT_1 = P2^3;</span><br><span class="line">sbit KEY_OUT_2 = P2^2;</span><br><span class="line">sbit KEY_OUT_3 = P2^1;</span><br><span class="line">sbit KEY_OUT_4 = P2^0;</span><br><span class="line">unsigned char code LedChar[] = &#123; //数码管显示字符转换表</span><br><span class="line">    0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8,</span><br><span class="line">    0x80, 0x90, 0x88, 0x83, 0xC6, 0xA1, 0x86, 0x8E</span><br><span class="line">&#125;;</span><br><span class="line">unsigned char KeySta[4][4] = &#123; //全部矩阵按键的当前状态</span><br><span class="line">    &#123;1, 1, 1, 1&#125;, &#123;1, 1, 1, 1&#125;, &#123;1, 1, 1, 1&#125;, &#123;1, 1, 1, 1&#125;</span><br><span class="line">&#125;;</span><br><span class="line">void main()&#123;</span><br><span class="line">    unsigned char i, j;</span><br><span class="line">    unsigned char backup[4][4] = &#123; //按键值备份，保存前一次的值</span><br><span class="line">        &#123;1, 1, 1, 1&#125;, &#123;1, 1, 1, 1&#125;, &#123;1, 1, 1, 1&#125;, &#123;1, 1, 1, 1&#125;</span><br><span class="line">    &#125;;</span><br><span class="line">   </span><br><span class="line">    EA = 1;  //使能总中断</span><br><span class="line">    ENLED = 0;  //选择数码管 DS1 进行显示</span><br><span class="line">    ADDR3 = 1;</span><br><span class="line">    ADDR2 = 0;</span><br><span class="line">    ADDR1 = 0;</span><br><span class="line">    ADDR0 = 0;</span><br><span class="line">    TMOD = 0x01;  //设置 T0 为模式 1</span><br><span class="line">    TH0 = 0xFC;  //为 T0 赋初值 0xFC67，定时 1ms</span><br><span class="line">    TL0 = 0x67;</span><br><span class="line">    ET0 = 1;  //使能 T0 中断</span><br><span class="line">    TR0 = 1;  //启动 T0</span><br><span class="line">    P0 = LedChar[0];  //默认显示 0</span><br><span class="line">   </span><br><span class="line">    while (1)&#123;</span><br><span class="line">        for (i=0; i&lt;4; i++)&#123; //循环检测 4*4 的矩阵按键</span><br><span class="line">            for (j=0; j&lt;4; j++)&#123;</span><br><span class="line">                if (backup[i][j] != KeySta[i][j])&#123; //检测按键动作</span><br><span class="line">                    if (backup[i][j] != 0)&#123; //按键按下时执行动作</span><br><span class="line">                        P0 = LedChar[i*4+j];  //将编号显示到数码管</span><br><span class="line">                    &#125;</span><br><span class="line">                    backup[i][j] = KeySta[i][j]; //更新前一次的备份值</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line">/* T0 中断服务函数，扫描矩阵按键状态并消抖 */</span><br><span class="line">void InterruptTimer0() interrupt 1&#123;</span><br><span class="line">    unsigned char i;</span><br><span class="line">    static unsigned char keyout = 0; //矩阵按键扫描输出索引</span><br><span class="line">    static unsigned char keybuf[4][4] = &#123; //矩阵按键扫描缓冲区</span><br><span class="line">        &#123;0xFF, 0xFF, 0xFF, 0xFF&#125;, &#123;0xFF, 0xFF, 0xFF, 0xFF&#125;,</span><br><span class="line">        &#123;0xFF, 0xFF, 0xFF, 0xFF&#125;, &#123;0xFF, 0xFF, 0xFF, 0xFF&#125;</span><br><span class="line">    &#125;;</span><br><span class="line">   </span><br><span class="line">    TH0 = 0xFC; //重新加载初值</span><br><span class="line">    TL0 = 0x67;</span><br><span class="line">    //将一行的 4 个按键值移入缓冲区</span><br><span class="line">    keybuf[keyout][0] = (keybuf[keyout][0] &lt;&lt; 1) | KEY_IN_1;</span><br><span class="line">    keybuf[keyout][1] = (keybuf[keyout][1] &lt;&lt; 1) | KEY_IN_2;</span><br><span class="line">    keybuf[keyout][2] = (keybuf[keyout][2] &lt;&lt; 1) | KEY_IN_3;</span><br><span class="line">    keybuf[keyout][3] = (keybuf[keyout][3] &lt;&lt; 1) | KEY_IN_4;</span><br><span class="line">    //消抖后更新按键状态</span><br><span class="line">    for (i=0; i&lt;4; i++)&#123; //每行 4 个按键，所以循环 4 次</span><br><span class="line">        //连续 4 次扫描值为 0，即 4*4ms 内都是按下状态时，可认为按键已稳定的按下</span><br><span class="line">        if ((keybuf[keyout][i] &amp; 0x0F) == 0x00)&#123;</span><br><span class="line">            KeySta[keyout][i] = 0;</span><br><span class="line">            //连续 4 次扫描值为 1，即 4*4ms 内都是弹起状态时，可认为按键已稳定的弹起</span><br><span class="line">        &#125;else if ((keybuf[keyout][i] &amp; 0x0F) == 0x0F)&#123;</span><br><span class="line">            KeySta[keyout][i] = 1;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    //执行下一次的扫描输出</span><br><span class="line">    keyout++;  //输出索引递增</span><br><span class="line">    keyout = keyout &amp; 0x03; //索引值加到 4 即归零</span><br><span class="line">   </span><br><span class="line">    //根据索引，释放当前输出引脚，拉低下次的输出引脚</span><br><span class="line">    switch (keyout)&#123;</span><br><span class="line">        case 0: KEY_OUT_4 = 1; KEY_OUT_1 = 0; break;</span><br><span class="line">        case 1: KEY_OUT_1 = 1; KEY_OUT_2 = 0; break;</span><br><span class="line">        case 2: KEY_OUT_2 = 1; KEY_OUT_3 = 0; break;</span><br><span class="line">        case 3: KEY_OUT_3 = 1; KEY_OUT_4 = 0; break;</span><br><span class="line">        default: break;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这个程序完成了矩阵按键的扫描、消抖、动作分离的全部内容，希望大家认真研究一下，彻底掌握矩阵按键的原理和应用方法。在程序中还有两点值得说明一下。</p>
<p>首先，可能你已经发现了，中断函数中扫描 KeyIn 输入和切换 KeyOut 输出的顺序与前面提到的顺序不同，程序中我首先对所有的 KeyIn 输入做了扫描、消抖，然后才切换到了下一次的 KeyOut 输出，也就是说我们中断每次扫描的实际是上一次输出选择的那行按键，这是为什么呢？因为任何信号从输出到稳定都需要一个时间，有时它足够快而有时却不够快，这取决于具体的电路设计，我们这里的输入输出顺序的颠倒就是为了让输出信号有足够的时间（一次中断间隔）来稳定，并有足够的时间来完成它对输入的影响，当你的按键电路中还有硬件电容消抖时，这样处理就是绝对必要的了，虽然这样使得程序理解起来有点绕，但它的适应性是最好的，换个说法就是，这段程序足够“健壮”，足以应对各种恶劣情况。</p>
<p>其次，是一点小小的编程技巧。注意看 keyout = keyout &amp; 0x03;这一行，在这里我是要让keyout 在 0～3 之间变化，加到 4 就自动归零，按照常规你可以用前面讲过的 if 语句轻松实现，但是你现在看一下这样程序是不是同样可以做到这一点呢？因为 0、1、2、3 这四个数值正好占用 2 个二进制的位，所以我们把一个字节的高 6 位一直清零的话，这个字节的值自然就是一种到 4 归零的效果了。看一下，这样一句代码比 if 语句要更为简洁吧，而效果完全一样。</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/limh/tags/教程/" rel="tag"># 教程</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/limh/2014/12/01/mcu053/" rel="next" title="8.6、单片机按键消抖程序">
                <i class="fa fa-chevron-left"></i> 8.6、单片机按键消抖程序
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/limh/2014/12/01/mcu055/" rel="prev" title="8.8、简易加法计算器程序">
                8.8、简易加法计算器程序 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
      <div id="SOHUCS"></div>
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/limh/images/avatar.jpg" alt="土逗牛肉">
            
              <p class="site-author-name" itemprop="name">土逗牛肉</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/limh/archives/">
              
                  <span class="site-state-item-count">255</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/limh/categories/index.html">
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/limh/tags/index.html">
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/limhGeek" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:1591054297@qq.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.jianshu.com/u/f73b243e7cc9" target="_blank" title="简书">
                      
                        <i class="fa fa-fw fa-user-circle-o"></i>简书</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">土逗牛肉</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
	var str = GetUrlParam('height');
    if (str === '0'){
		document.getElementById('header').style.display = 'none';
		document.getElementById('comments').style.display = 'none';
		document.getElementById('footer').style.display = 'none';
		document.getElementsByClassName('post-footer').item(0).style.display = 'none'
	}
	
    function GetUrlParam(paraName) {
        var url = document.location.toString();
        var arrObj = url.split("?");

        if (arrObj.length > 1) {
            var arrPara = arrObj[1].split("&");
            var arr;

            for (var i = 0; i < arrPara.length; i++) {
                 arr = arrPara[i].split("=");

                if (arr != null && arr[0] === paraName) {
                    return arr[1];
                }
            }
            return "";
        } else {
            return "";
        }
    }
</script>









  












  
  
    <script type="text/javascript" src="/limh/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/limh/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/limh/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/limh/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/limh/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/limh/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/limh/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/limh/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/limh/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/limh/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/limh/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/limh/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/limh/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
